const url           = require('url');
const async         = require('async');
const BaseHandler   = require('../base-handler');
const SystemServices = require('../../../constants').SystemServices;
const HTTP_VERBS = require('../../../constants').HTTP_VERBS;

class CalendarHandler extends BaseHandler {

    get pattern() {
        return "/calendar";
    }

    doGET(request, response) {
        if(!request.session.user.authenticated) {
            response.redirect('/login')
        } else {
            response.render('console/calendar', {user: request.session.user});
        }
    }

    setup() {
        this.registerVerb(HTTP_VERBS.GET, this.doGET);
    }
}

module.exports = CalendarHandler;